package com.augrain.microframework.trace.instrument.client;

import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * RestTemplate自动装配
 *
 * @author biaoy
 * @since 2021/08/22
 */
@Configuration
@ConditionalOnClass(name = {"org.springframework.web.client.RestTemplate"})
public class TraceRestTemplateAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean
    public RestTemplatePostProcessor restTemplatePostProcessor() {
        return new RestTemplatePostProcessor();
    }

}
